var context = new Number(1);
var picture = new Number(1);
var music = new Number(1);
var viedo = new Number(1);

var type_count = new Number(4);

var context_base = new Number(0);
var picture_base = new Number(1);
var music_base = new Number(2);
var viedo_base = new Number(3);

function removeModule(id) {
	$("#show_modules" + id).remove();
}

function addModule(type) {
	$("#hiddenlist").hide();
	$("#titlefocus").focus();
	$("#titlefocus").blur();
	switch (type) {
	case 0:
		if (!(context >= 3)) {
			var context_index = type_count * context + context_base;
			
			$("#show_modules" + context_index).show('slow');
			context++;
		} else {
			alert("已达到了您的用户组所允许的最大数量");
		}
		break;
	case 1:
		if (!(picture >= 3)) {
			var picture_index = type_count * picture + picture_base;
			$("#show_modules" + picture_index).show('slow');
			picture++;
		} else {
			alert("已达到了您的用户组所允许的最大数量");
		}

		break;
	case 2:
		if (!(music >= 3)) {
			var music_index = type_count * music + music_base;
			$("#show_modules" + music_index).show('slow');
			music++;
		} else {
			alert("已达到了您的用户组所允许的最大数量");
		}

		break;
	case 3:
		if (!(viedo >= 3)) {
			var viedo_index = type_count * viedo + viedo_base;
			$("#show_modules" + viedo_index).show('slow');
			viedo++;
		} else {
			alert("已达到了您的用户组所允许的最大数量");
		}
		break;
	}
	

}
$(function() {

});
